package com.hb.core.pojo.project.proj.enums;

import com.hb.core.pojo.project.proj.dto.*;
import com.hb.core.pojo.project.proj.entity.*;
import lombok.Getter;

@Getter
public enum BidWayEnum {
    BID(1, "公开招标", BidProject.class, BidProjectDTO.class),
    INQ(7, "询价", InquiryProject.class, InquiryProjectDTO.class),
    NEG(3, "竞争性谈判", NegProject.class, NegProjectDTO.class),
    CON(2, "竞争性磋商", ConProject.class, ConProjectDTO.class),
    // COM(8, "竞价", CompeteProject.class, CompeteProjectDTO.class),
    // INQT(4, "询比价", InquiryThanProject.class, InquiryProjectThanDTO.class),
    // DIRECT(6, "直接采购", DirectProject.class, DirectProjectDTO.class),
    SINGLE(5, "单一来源采购", SingleProject.class, SingleProjectDTO.class),
    ;

    /**
     * 项目类型枚举构造方法
     *
     * @param code           项目类型代码
     * @param showName       显示名称
     * @param targetClass    数据库实体类型
     * @param dtoTargetClass 实体类型对应的数据传输类型
     */
    BidWayEnum(int code, String showName,
               Class<? extends AbstractProject> targetClass,
               Class<? extends AbstractProject> dtoTargetClass) {
        this.code = code;
        this.showName = showName;
        this.targetClass = targetClass;
        this.dtoTargetClass = dtoTargetClass;
    }

    private final int code;
    private final String showName;
    private final Class<? extends AbstractProject> targetClass;
    private final Class<? extends AbstractProject> dtoTargetClass;
}
